<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="zn_cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="./css/bootstrap.css"/>
<style type="text/css">
.bg{
	background-image:url('./img/bg.jpg');
	background-repeat:no-repeat;
	height:200px;
	background-size:95% 100%;
}
.title_height{
	margin:15px 18px;
	white-space:nowrap;
	width:12em;
	overflow:hidden;
	text-overflow:ellipsis;
}
</style>
<title>用户列表</title>
</head>
<body>

<div class="container" style="background-color: white">
<div class="row">
<form action="addrole.do" method="post">
<table class="table table-hover">
<tr>
<th>用户名</th>
<th>角色</th>
<th> </th>
</tr>
<c:forEach items="${users}" var="opt">
<tr>
<td>${opt.loginname}</td>
<td>
 <select name="RoleId" class="form-control">
    <c:forEach items="${roles}" var="role">
    <option value="${role.id}">${role.rolename}</option>
    </c:forEach>
    </select></td>
<td>
<input type="hidden" name="username" value="${opt.loginname}">
<input type="submit" value="确定"></td>
</tr>
</c:forEach>
</table>


</form>
</div>
</div>
</body>
</html>